<!DOCTYPE html>
<#assign contextPath="" />
<html >
<head>
    <meta charset="UTF-8">
    <link rel="stylesheet" href="${contextPath}/css/login.css">
    <title></title>
    <script type="text/javascript" src="${contextPath}/js/myJS.js"></script>
    <script language="JavaScript" src="${contextPath}/js/jquery-3.2.1.min.js"></script>
    <script language="JavaScript" src="${contextPath}/js/login.js"></script>
</head>
<body>
<script>
    function changeCode() {
        var codeImg = document.getElementById("codeImg");
        codeImg.src = "${contextPath}/user/validateCode?time=" + new Date().getTime();
    }
</script>
<div id="login">
    <div id="logo">
        <a href="index.jsp">
            <img src="${contextPath}/img/font1.jpg" id="font1">
            <img src="${contextPath}/img/logo.jpg" id="logo-img" >
            <img src="${contextPath}/img/font2.jpg" id="font2">
        </a>
    </div>
    <form action="#" method="post" id="login-form">
    <div id="error"><span>aaaaaa</span></div>
    <input type="text" name="name" id="username" required autocomplete="off" placeholder="用户名">
    <input type="password" name="password" id="password" autocomplete="off" required placeholder="密码">
    <div id="yzm">
        <input type="text" name="code" id="code" autocomplete="off" required maxlength="4" placeholder="验证码">
        <img src="${contextPath}/user/validateCode" alt="" id="codeImg" onclick="changeCode()">
        <a href="javascript:changeCode()">换一张</a><br></div>
        <input type="button" id="submit" value="登录" style="cursor: pointer">
        <br/>
    </form>
    </div>
</body>
</html>
